

<!-- 提交订单 -->
<template>
	<view style="width: 100%;">

		<!-- header部分 -->
		<view class='header-Container header-height'>
			<view class="header-bg"></view>
			<navHeader pageTitle="提交订单" rightBtnType="msgCenter" colorTheme="black" @toggleMenuListHandler="toggleMenuListHandler">
			</navHeader>
		</view>


		<!-- 收货人信息 -->
		<view v-if="noAddrFlag" @click="addAddressHandler()" class="noAddress-Container">
			<image class="addIcon" :src="icon.addIcon" mode=""></image>
			<view class="addText">
				新增收货地址
			</view>
			<image class="rightRed" :src="icon.rightRed" mode=""></image>
		</view>
		<view v-else class="address" @click="toAddress()">
			
			<!-- 收货人信息 -->
			<view class="message">
				<view class="row_1">
					<view class="icon">
						<image :src="icon.address"></image>
					</view>
					<view class="userInfo">
						<view class="user">
							<text>{{ addressData.consignee }}</text>
							<text>{{ addressData.telephone }}</text>
						</view>
					</view>
				</view>
				<view class="detail ellipsis2">
					{{ addressData.province }}{{ addressData.city }}{{ addressData.district }}{{ addressData.address }}
				</view>
			</view>
			
			<!-- 选择地址 -->
			<image class="addressMore" :src="icon.addressMore"></image>
			
			<image :src="icon.tip" class="bottom-tiao"></image>
		</view>
		

		<!-- 身份信息认证 -->
		<block v-if="taxationFlag == 1">
			<view v-if="!realNameFlag" @click="showRealNameHandler()" class="address recognition">
				<view class="message">
					<view class="row_1">
						<view class="icon">
							<image :src="icon.renzheng"></image>
						</view>
						<view class="">
							<view class="r-user"><text>身份信息认证</text></view>
						</view>
					</view>
					<view class="detail ellipsis2">
						<view class="r-detail ellipsis2">根据海关规定，需要您完善付款人身份证信息</view>
					</view>
				</view>
				
				<!-- 选择实名 -->
				<image class="addressMore" :src="icon.addressMore"></image>
			</view>
			<view v-else @click="showRealNameHandler()" class="address recognition">
				<view class="message">
					<view class="row_1">
						<view class="icon">
							<image :src="icon.renzheng"></image>
						</view>
						<view class="">
							<view class="r-user"><text style="color: #333333;">{{realName.userName}}</text></view>
						</view>
					</view>
					<view class="detail ellipsis2">
						<view class="r-detail ellipsis2">{{realName.idCard}}</view>
					</view>
				</view>
				
				<!-- 选择实名 -->
				<image class="addressMore" :src="icon.addressMore"></image>
			</view>
		</block>
		
		<!-- 商品图片 -->
		<view @click="showSubmitOrderHandler()" v-if="shopCartIds.length > 1" class="goods-img">
			<view class="imgs">
				<view v-for="(item, index) of shopCartData" :key="index">
					<image v-for="(item2, index2) of item.shopCartGoodsForms" :key="index2" :src="imgSite + item2.coverPicture"></image>
				</view>
			</view>
			<view class="num-total">
				共{{shopCartIds.length}}件
				<image :src="icon.bindRight"></image>
			</view>
		</view>
		
		<!-- 只有1件时 -->
		<view @click="showSubmitOrderHandler()" v-if="shopCartIds.length == 1" 
			v-for="(item, index) of shopCartData" 
			:key="index" 
			class="goods-box-single"
		>
			<view class="goodsBaseInfo">
				<image class="goods-img" :src="imgSite + item.shopCartGoodsForms[index].coverPicture" mode="aspectFill"></image>
				<view class="right">
					<view class="title ellipsis2">
						<text v-if="item.shopCartGoodsForms[index].activityType == 2" class="goodsLabel seckill">秒杀</text>
						<text v-if="item.shopCartGoodsForms[index].activityType == 5" class="goodsLabel bargain">砍价</text>
						<text v-if="item.shopCartGoodsForms[index].activityType == 6" class="goodsLabel preGroup">拼团预售</text>
						{{item.shopCartGoodsForms[index].goodName}}
					</view>
					<view class="specPrice">
						<view class="attr-box ellipsis1">
							{{item.shopCartGoodsForms[index].goodsCategoryAttr}}
						</view>
						
						<!-- 销售策略 10：现金 20：现金＋积分 40：积分 60:水券 70:水券 + 现金 -->
						<view v-if="item.shopCartGoodsForms[index].salesStrategy == 10" class='price'>
							<text v-if="item.shopCartGoodsForms[index].showMemberFlag">¥{{ item.shopCartGoodsForms[index].memberPrice / 100 }}</text>
							<text v-else>¥{{ item.shopCartGoodsForms[index].salesPrice / 100 }}</text>
						</view>
						<view v-if="item.shopCartGoodsForms[index].salesStrategy == 20" class='price'>
							<text v-if="item.shopCartGoodsForms[index].showMemberFlag">¥{{ item.shopCartGoodsForms[index].memberPrice / 100 }}</text>
							<text v-else>¥{{ item.shopCartGoodsForms[index].salesPrice / 100 }}</text>
<!--							<text>+</text>-->
<!--							<text>{{ item.shopCartGoodsForms[index].salesPoint }}</text>-->
<!--							<text>积分</text>-->
						</view>
						<!-- <view v-if="item.shopCartGoodsForms[index].salesStrategy == 40" class='price'>
							<text>{{ item.shopCartGoodsForms[index].salesPoint }}</text>
							<text>积分</text>
						</view>
						<view v-if="item.shopCartGoodsForms[index].salesStrategy == 60" class='price'>
							<text>{{ item.shopCartGoodsForms[index].waterCoupon / 100 }}</text>
							<text>水券</text>
						</view>
						<view v-if="item.shopCartGoodsForms[index].salesStrategy == 70" class='price'>
							<text v-if="item.shopCartGoodsForms[index].showMemberFlag">¥{{ item.shopCartGoodsForms[index].memberPrice / 100 }}</text>
							<text v-else>¥{{ item.shopCartGoodsForms[index].salesPrice / 100 }}</text>
							<text>+</text>
							<text>{{ item.shopCartGoodsForms[index].waterCoupon / 100 }}</text>
							<text>水券</text>
						</view> -->
						<view v-if="item.shopCartGoodsForms[index].salesStrategy == 100" class='price'>
							<text>¥{{ item.shopCartGoodsForms[index].salesPrice / 100 }}</text>
						</view>
					</view>
					<view class="buyNum">
						x{{item.shopCartGoodsForms[index].num}}
					</view>
				</view>
			</view>
			
			<!-- 赠品信息 -->
			<view v-for="(item3, index) of item.shopCartGoodsForms[index].giftGoodList" :key="item3.id" class="gift">
				<view v-if="index == 0" class="left">赠品</view>
				<view v-else class="left" style="visibility: hidden;">赠品</view>
				<view @click="gotoDetail('', item3.goodsCd)" class="g-name ellipsis2">{{ item3.goodsBaseInfo | giftGoodFormat}}</view>
				<view class="g-num">x{{ item3.giftCount }}</view>
			</view>
		</view>
		

		<!-- 优惠券等抵扣详情 -->
		<view class="discount">
			
			<!-- 奖品核销优惠券不可用 -->
			<view v-if="prizeReceiveId || activityGroupMainId || bargainId || taxationFlag == 1" class="discount-block">
				<view class="left">优惠券</view>
				<view class="right">
					<image :src="icon.bindRight3" class="tap"></image>
					<view class="price">
						<span>无可用</span>
					</view>
				</view>
			</view>
			<view v-else @click="showSelectCouponHandler(true)" class="discount-block">
				<view class="left">优惠券</view>
				<view class="right">
					<image :src="icon.bindRight3" class="tap"></image>
					<view v-if="selectCouponData.length">
						<view class="price">优惠¥{{(orderFeeInfo.couponAmount || 0.00) / 100}}</view>
					</view>
					<view v-else class="price">
						<span v-if="kyCouponList.length">{{kyCouponList.length}}张可用</span>
						<span v-else>无可用</span>
					</view>
				</view>
			</view>

			<view @click="showSubmitOrderHandler" class="discount-block">
				<view class="left">发票</view>
				<view class="right">
					<image :src="icon.bindRight3" class="tap"></image>
					<view class="price">{{shopCartData | getInvoiceFlag | cidTypeFormate}}</view>
				</view>
			</view>
			<view class="discount-block" @click="showSubmitOrderHandler">
				<view class="left">备注</view>
				<view class="right">
					<image :src="icon.bindRight3" class="tap"></image>
					<view class="price">{{remark ? '已备注' : '未备注'}}</view>
				</view>
			</view>

			<!-- 奖品核销优惠券不可用 -->
			<!-- <view v-if="prizeReceiveId || taxationFlag == 1" class="discount-block">
				<view class="left">礼品卡</view>
				<view class="right">
					<uiSwitch status="0">
					</uiSwitch>
					<view class="price">无可用</view>
				</view>
			</view> -->
			<!-- <view v-else class="discount-block">
				<view class="left">礼品卡</view>
				<view @click="changeUseGiftCardFlag()" class="right">
					<uiSwitch :status="useGiftCardFlag ? 1 : 0">
					</uiSwitch>
					<view v-if="giftCardBalance" class="price">¥{{giftCardBalance}}可用</view>
					<view v-else class="price">无可用</view>
				</view>
			</view> -->
			
			<!-- <view class="discount-block">
				<view class="left">积分</view>
				<view class="right">
					<uiSwitch :status="orderFeeInfo.points">
					</uiSwitch>
					<view v-if="orderFeeInfo.points" class="price">共{{orderFeeInfo.pointBalance}}，本单需使用{{orderFeeInfo.points}}</view>
					<view v-else class="price">无可用</view>
				</view>
			</view>
			
			<view class="discount-block">
				<view class="left">水券</view>
				<view class="right">
					<uiSwitch :status="orderFeeInfo.waters">
					</uiSwitch>
					<view v-if="orderFeeInfo.waters" class="price">共{{orderFeeInfo.waterBalance / 100}}，本单需使用{{orderFeeInfo.waters / 100}}</view>
					<view v-else class="price">无可用</view>
				</view>
			</view> -->
		</view>

		
		<!-- 商品金额明细 -->
		<view class="discount">
			<view class="discount-block">
				<view class="left title2">商品总额</view>
				<view class="right">
					<view class="price">
						￥{{orderFeeInfo.actualPrice / 100}}
					</view>
				</view>
			</view>
			<view class="discount-block">
				<view class="left title2" style="width: 400rpx;">
					商品运费<!-- (总重:{{orderFeeInfo.totalGoodsWeight / 1000}}kg) -->
				</view>
				<view class="right">
					<view class="price-red">+￥{{(orderFeeInfo.logisticsAmount || 0.00) / 100}}</view>
				</view>
			</view>
			<view class="discount-block">
				<view class="left title2">优惠券</view>
				<view class="right">
					<!-- 优惠券类型 -->
					<view class="price-red">-￥{{(orderFeeInfo.couponAmount || 0.00) / 100}}</view>
				</view>
			</view>
			<view class="row-div" style="border-top: 1upx solid #EEEEEE;margin-top: 40upx;">
				<view class="row-div" style="margin-top: 27upx;">
					<image src="/static/assets/gongxianzhi.png" style="width: 28upx;height: 25upx;" mode=""></image>
					<text style="font-size: 24upx;font-weight: bold;color: #FE5E49;margin-left: 10upx;">下单可获贡献值{{contribution}}</text>
				</view>
			</view>
			<!-- <view v-if="orderFeeInfo.reductionMoney" class="discount-block">
				<view class="left title2">满减金额</view>
				<view class="right"><view class="price-red">-￥{{orderFeeInfo.reductionMoney / 100}}</view></view>
			</view> -->
			<!-- <view class="discount-block">
				<view class="left title2">礼品卡</view>
				<view class="right"><view class="price-red">-￥{{orderFeeInfo.giftCardAmount / 100}}</view></view>
			</view> -->
			<!-- <view class="discount-block">
				<view class="left title2">积分</view>
				<view class="right">
					<view class="price-red">-￥{{orderFeeInfo.points || 0.00}}</view>
				</view>
			</view> -->
			<!-- <view class="discount-block">
				<view class="left title2">水券</view>
				<view class="right">
					<view class="price-red">-￥{{(orderFeeInfo.waters || 0.00) / 100}}</view>
				</view>
			</view> -->
		</view>

		
		<!-- 底部地址 -->
		<view class="bottom-address" v-if="addressShow && addressData">
			{{ addressData.province }}{{ addressData.city }}{{ addressData.district }}{{ addressData.address }}
		</view>
		

		<!-- 底部总金额 -->
		<view class="safeBottom">
			<view class="bottom-total">
				<view v-if="activityGroupMainId" class="left">
					<text style="color:#333333;">实付款:</text>
					<text style="color:#FE5E49;margin-left: 10upx;">￥{{orderFeeInfo.amount / 100}}</text> 
					
					<block v-if="orderFeeInfo.advFlag == 1">
						<text style="margin-left: 10px; color:#333333;">定金:</text>
						<text style="color:#FE5E49;margin-left: 10upx;">￥{{orderFeeInfo.advAmount / 100}}</text>
					</block>
				</view>
				<view v-else class="left">
					<text style="color:#333333;">实付款:</text>
					<text style="color:#FE5E49;margin-left: 10upx;">￥{{orderFeeInfo.amount / 100}}</text>
				</view>
				<view @click="submitOrderHandler" class="right">
					<view>提交订单</view>
				</view>
			</view>
		</view>


		<!-- 优惠券弹窗 -->
		<couponModalSelect :showFlag="showCouponModal" :kyCouponList="kyCouponList" :bkyCouponList="bkyCouponList"
		 :kyCouponListLength="kyCouponList.length" 
		 :bkyCouponListLength="bkyCouponList.length" 
		 @closeModalHandler="closeModalHandler"
		 @couponSelectHandler="couponSelectHandler"
		 @confirmSelectCouponHandler="confirmSelectCouponHandler"></couponModalSelect>
		<!-- 商品清单弹窗 -->
		<goodListSubmitOrder :showFlag="showSubmitOrderModal" :shopCartData="shopCartData" :shopGoodsCount="shopGoodsCount" @closeModalHandler="closeModalHandler"></goodListSubmitOrder>
	
	
		<!-- 支付密码 -->
		<view v-if="showPayPassFlag" class="payPassBg-Container">
			<view class="setPass-Container">
				<view class="modalTitle">
					请输入支付密码
				</view>
				
				<!-- 关闭弹窗 -->
				<image @click="closePayModalHandler" :src="icon.closeModalBtn" class="closeModalBtn"></image>
				
				<view @tap="showFun" class="content">
					<view class="passwordBg-Container">
						<image class="password-bg" :src="icon.password" mode=""></image>
					</view>
					
					<view v-for="(item, index) in 6" :key="item" class="password-item">
						{{password[index] ? '●' :''}}
					</view>
				</view>
				
				<view class="forgetPass-Container">
					<view class="forgetPass">
						<view @click="gotoPayPassPage()">
							忘记密码？
						</view>
					</view>
				</view>
				
				<view class="confirmPayOuter-Container">
					<view @click="confirmPayHandler()" class="confirmPay-Container">
						确认支付
					</view>
				</view>
			</view>
			<pay-keyboard :show_key="show_key" @hideFun="hideFun" @getPassword="getPassword"></pay-keyboard>
		</view>
		
		
		<!-- TODO -->
		<!-- 身份认证信息 -->
		<view v-if="showRealNameFlag" class="realName-OutContainer">
			<view class="realName-Container">
				<view class="dialogTitle">
					身份认证信息
				</view>
				<view class="realName-tips_top">
					由于海关清关需要，购买跨境进口商品必须填写付款人的真实姓名和身份证信息。
				</view>
				
				<!-- 姓名/身份证 -->
				<view class="realNameInfo">
					<view class="label">
						姓名
					</view>
					<input type="text" v-model="realNameInput.userName" placeholder-class="inputHolder" placeholder="请输入付款账户的真实姓名"/>
				</view>
				<view class="realNameInfo" style="margin-top: 20rpx;">
					<view class="label">
						身份证
					</view>
					<input type="text" v-model="realNameInput.idCard" placeholder-class="inputHolder" placeholder="请输入付款账户的身份证号"/>
				</view>
				
				<view @click="realNameHandler()" class="realNameBtn">
					保存
				</view>
				
				<view class="realName-tips_bottom">
					本人同意手机和使用本人上述信息，用于实现清关实名认证目的，您的信息将被加密保管。
				</view>
				<image @click="closeRealNameHandler()" class="closeModalBtn" :src="icon.closeModalBtn"></image>
			</view>
		</view>
	
	
		<!-- 详情菜单 -->
		<view v-if="showDetailMenu" @click="toggleMenuListHandler()" class="detailMenu-Container">
			<detailMenu></detailMenu>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';

	import navHeader from '@/components/nav-header/nav-header';
	import detailMenu from "@/components/detailMenu/detailMenu";
	import payKeyboard from '@/components/keyboard/keyboard';
	import couponModalSelect from "@/components/couponModal/couponModalSelect";
	import goodListSubmitOrder from "@/components/goodList/goodListSubmitOrder";
	import uiSwitch from "@/components/ui-component/switch";
		

	export default {
		filters: {

			// 地址Str
			getAddressStr: function(addr) {
				return addr.provinceName + addr.cityName + addr.areaName + addr.address;
			},
			
			//商品名称
			getGoodsName(goodsJson) {
				return JSON.parse(goodsJson.goodsBaseInfo)['goodsName'];
			},
			
			//商品图片
			getGoodsCoverPicture(goodsJson) {
				return JSON.parse(goodsJson.goodsBaseInfo)['coverPicture'];
			},
			
			
			//选择发票标记
			getInvoiceFlag(shopCartData) {
				var cidType = "";
				for(var i = 0; i < shopCartData.length; i ++) {
					if(shopCartData[i].invoiceInfo) {
						cidType = shopCartData[i].invoiceInfo.cidType;
						break;
					}
				}
				
				return cidType;
			},
			
			//发票类型格式化
			cidTypeFormate: function(cidType) {
				if(cidType) {
					return "已选择";
				}else {
					return "不需要发票";
				}
			},
			
			//赠品信息格式化
			giftGoodFormat(goodsBaseInfo) {
				var baseInfo = JSON.parse(goodsBaseInfo);
				return baseInfo['goodsName'];
			}
		},
		components: {
			navHeader,
			detailMenu,
			payKeyboard,
			couponModalSelect,
			goodListSubmitOrder,
			uiSwitch
		},
		computed: {
			...mapState(['imgSite', 'downUrl'])
		},
		data() {
			return {
				shareGoods: '', // 分享者ID
				contribution: 0, // 贡献值
				icon: {
					addIcon: '/static/images/order/addIcon.png',
					rightRed: '/static/images/order/right-red.png',
					address: '/static/assets/address.png',
					addressMore: '/static/images/order/addressMore.png',
					renzheng: '/static/images/order/renzheng.png',
					tip: '/static/images/order/tip.png',
					bindRight: '/static/images/order/right-to.png',
					bindRight3: '/static/images/order/right-to3.png',
					youhui: '/static/images/order/youhui.png',
					
					password: "/static/images/order/pay/password.png",
					
					closeModalBtn: "/static/images/common/closeModal.png"
				},
				
				//详情菜单
				showDetailMenu: false,

				//地址信息
				shopCartFlag: 0,
				noAddrFlag: true,
				addressData: {},
				
				//实名信息
				showRealNameFlag: false,
				realNameFlag: false,
				realName: {
					userName: "",
					idCard: ""
				},
				realNameInput: {
					userName: "",
					idCard: ""
				},

				//保税商品
				taxationFlag: -1,
				
				//预售拼团信息
				activityGroupMainId: "",//大团id
				activityGroupId: "", //小团id
				
				//砍价信息
				bargainId: "",
				
				//抽奖信息
				prizeReceiveId: "",

				//优惠券窗口
				selectCouponData: [],
				showCouponModal: false,
				couponList: [],
				kyCouponList: [],
				bkyCouponList: [],
				disableCouponReceiveId: "",

				//商品清单弹窗
				showSubmitOrderModal: false,
				shopCartData: [],
				shopGoodsCount: 0,

				//订单费用
				useGiftCardFlag: false,
				giftCardBalance: 0,
				shopCartIds: [],
				orderFeeInfo: {},
				
				addressShow:false,
				
				
				//支付密码
				showPayPassFlag: false,
				show_key: false,
				password: '',
				
				orderData: {},
				remark: false
			};
		},
		onPageScroll(e) {
			if(e.scrollTop>=50){
				this.addressShow = true
			}else{
				this.addressShow = false
			}
		},
		onLoad(option) {

			//保税商品
			this.taxationFlag = option.taxationFlag;
			
			//购物车标识
			this.shopCartFlag = option.shopCartFlag || 0;
			
			//拼团预售信息
			if(option.preGroupInfo) {
				var preGroupInfo = JSON.parse(option.preGroupInfo);
				this.activityGroupMainId = preGroupInfo.activityGroupMainId || "",//大团id
				this.activityGroupId = preGroupInfo.activityGroupId || "" //小团id
			}
			
			//砍价信息
			if(option.bargainId) {
				this.bargainId = option.bargainId;
			}
			
			//抽奖信息
			if(option.prizeReceiveId) {
				this.prizeReceiveId = option.prizeReceiveId;
			}
			

			//购物车商品
			this.shopCartData = JSON.parse(uni.getStorageSync('shopCartData'));
			this.contribution = uni.getStorageSync('contribution') || 0;
			var shopCartIds = [];
			for (var i = 0; i < this.shopCartData.length; i++) {
				for (var j = 0; j < this.shopCartData[i].shopCartGoodsForms.length; j++) {
					var goods = this.shopCartData[i].shopCartGoodsForms[j];
					goods.showMemberFlag = this.getShowMemberFlag(goods);
					shopCartIds.push(goods.id);
				}
			}
			this.shopCartIds = shopCartIds;
			this.shopGoodsCount = shopCartIds.length;
		},
		onShow() {

			this.showDetailMenu = false;

			//地址信息
			var addressData = uni.getStorageSync('addressData');
			if(addressData) {
				
				this.noAddrFlag = false;
				this.addressData = JSON.parse(uni.getStorageSync('addressData') || "{}");
				
				//计算订单费用
				this.calculateOrderFee();
				this.showSelectCouponHandler();
			}else {
				//获取用户地址
				this.noAddrFlag = true;
				this.getUserAddress_fun();
			}
			
			
			var that = this;
			that.$api.globalUtil.requestAjax({
				url: '/AccountBalanceApi/findAccountBalanceByCustomerIdForApi',
				method: 'POST',
				success: function(res) {
					that.giftCardBalance = res.data.response.giftCardBalance / 100;
				}
			});
			
			//实名信息
			that.$api.globalUtil.getUserInfo(that, function(res) {
				if(res.data.response.name) {
					that.realName.userName = res.data.response.name;
					that.realName.idCard = res.data.response.fullIdCard;
					that.realNameFlag = true;
				}else {
					that.realNameFlag = false;
				}
			});
		},
		methods: {
			
			// 显示会员价逻辑
			getShowMemberFlag(item) {
				if(item.customerLevelId
					&& (item.salesStrategy == 10 || item.salesStrategy == 20 || item.salesStrategy == 70)
					&& (item.memberName && item.memberPrice)) {
						
					return true;
				}else {
					return false;
				}
			},
			
			//商品详情
			gotoDetail(activityType, id) {
			
				// 2：秒杀活动 5：砍价 6：拼团预售
				if(activityType) {
					if(activityType == 2) {
						uni.navigateTo({
							url: '/pages/detail/seckill?id=' + id
						});
					}
					if(activityType == 5) {
						uni.navigateTo({
							url: '/pages/detail/bargain?id=' + id
						});
					}
					if(activityType == 6) {
						uni.navigateTo({
							url: '/pages/detail/preGroup?id=' + id
						});
					}
				}else {
					uni.navigateTo({
						url: '/pages/detail/detail?id=' + id
					});
				}
			},
			
			//详情菜单
			toggleMenuListHandler() {
				this.showDetailMenu = !this.showDetailMenu;
			},
			
			// 返回
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			
			
			// 跳转收货地址
			toAddress() {
				uni.navigateTo({
					url: '/pagesUser/address/address?select=1'
				});
			},
			
			
			// 新增收货地址
			addAddressHandler() {
				uni.navigateTo({
					url: '/pagesUser/address/addressManage?type=add'
				});
			},
			
			
			// 获取用户地址
			getUserAddress_fun() {
				
				let that = this;
				that.$api.globalUtil.requestAjax({
					url: '/CustomerApi/findCustomerAddressByCustomerIdForApi',
					method: 'POST',
					success: function(res) {
						if(res.data.response.length) {
							var addressList = res.data.response;
							for(var i = 0; i < addressList.length; i++) {
								if(addressList[i].defaultFlag == 1) {
									that.noAddrFlag = false;
									that.addressData = addressList[i];
									
									//计算订单费用
									that.calculateOrderFee();
									that.showSelectCouponHandler();
									break;
								}
							}
							
							
							//未设置默认选择第一个地址
							if(that.noAddrFlag == true) {
								that.noAddrFlag = false;
								that.addressData = addressList[0];
								
								//计算订单费用
								that.calculateOrderFee();
								that.showSelectCouponHandler();
							}
						}else {
							that.noAddrFlag = true;
							that.addressData = {};
							
							//计算订单费用
							that.calculateOrderFee();
							that.showSelectCouponHandler();
						}
					}
				});
			},

			
			//商品图片
			getGoodsCoverPicture(goodsJson) {
				console.log(goodsJson);
				return JSON.parse(goodsJson.goodsBaseInfo)['coverPicture'];
			},
			

			//商品清单
			showSubmitOrderHandler() {
				this.showSubmitOrderModal = true;
			},
			
			
			//选择发票回调
			selectInvoiceHandler(invoiceInfo, shopIndex) {
				if(invoiceInfo) {
					var shopIndex = invoiceInfo.shopIndex;
					this.$set(this.shopCartData[shopIndex], "invoiceInfo", invoiceInfo);
				}else {
					this.$set(this.shopCartData[shopIndex], "invoiceInfo", invoiceInfo);
				}
			},


			// 关闭弹窗
			closeModalHandler(shopCartData) {
				console.log("shopCartData", shopCartData)
				let arr = [], list = shopCartData || []
				list.forEach(item => {
					if (item.message) {
						arr.push(item.message)
					}
				})
				this.remark = arr.length > 0 && arr.length == list.length;
				this.showCouponModal = false;
				this.showSubmitOrderModal = false;
			},
			
			
			//礼品卡状态
			changeUseGiftCardFlag() {
				
				if(this.giftCardBalance > 0) {
					this.useGiftCardFlag = !this.useGiftCardFlag;
					
					// 计算订单费用
					this.calculateOrderFee();
				}
			},


			// 选择优惠券
			showSelectCouponHandler(defaultFlag) {

				var that = this;
				that.$api.globalUtil.requestAjax({
					url: "/coupon/queryCommitOrderCouponListByCustomer",
					method: "POST",
					data: {
						shopCartIds: that.shopCartIds.join(","), //购物车id
						customerAddressId: that.addressData.id //收货地址id
					},
					success: function(res) {
						if (res.data.success) {
							
							//默认选择优惠券
							for(var j = 0; j < that.selectCouponData.length; j++) {
								for (var i = 0; i < res.data.response.kyCouponList.length; i++) {
									if (res.data.response.kyCouponList[i].couponReceiveId == that.selectCouponData[j]) {
										res.data.response.kyCouponList[i].selectedTag = 1;
									}
								}
							}
							
							
							that.kyCouponList = res.data.response.kyCouponList;
							that.bkyCouponList = res.data.response.bkyCouponList;
							
							
							if(defaultFlag) {
								if(that.kyCouponList && that.kyCouponList.length) {
									that.showCouponModal = true;
								}
							}
						}
					}
				});
			},


			// 选中优惠券
			couponSelectHandler(params) {
				
				var that = this;
				
				//选中\取消优惠券
				that.$set(that.kyCouponList[params.index], "selectedTag", params.status);
				
				//验证优惠券叠加
				that.verifyCouponOverlayUse();
			},
			
			
			//验证优惠券叠加使用
			verifyCouponOverlayUse() {
				
				var that = this;
				
				// 可用优惠券id
				var couponReceiveId = [];
				for (var i = 0; i < that.kyCouponList.length; i++) {
					couponReceiveId.push(that.kyCouponList[i].couponReceiveId);
				}
				
				
				// 已选优惠券id
				var selectCouponData = [];
				for (var i = 0; i < that.kyCouponList.length; i++) {
					if (that.kyCouponList[i].selectedTag == 1) {
						selectCouponData.push(that.kyCouponList[i].couponReceiveId);
					}
				}
				
				//验证优惠券是否重叠使用
				that.$api.globalUtil.requestAjax({
					url: "/OrderApi/verifyOrderCouponForApi",
					method: "POST",
					data: {
						shopCartIds: that.shopCartIds.join(","), //购物车id
						customerAddressId: that.addressData.id, //收货地址id
						couponReceiveId: (couponReceiveId? couponReceiveId.join(",") : ""), //可用优惠券id
						selectCouponReceiveId: (selectCouponData? selectCouponData.join(",") : ""), //已选优惠券id
					},
					success: function(res) {
						if (res.data.success) {
							
							//重置优惠券可用状态
							for (var i = 0; i < that.kyCouponList.length; i++) {
								that.$set(that.kyCouponList[i], "disabledTag", false);
							}
							
							
							//不可选择优惠券
							that.disableCouponReceiveId = res.data.response.disableCouponList;
							if(!that.disableCouponReceiveId) {
								return ;
							}else {
								
								var disableCouponData = that.disableCouponReceiveId.split(",");
								for (var i = 0; i < disableCouponData.length; i++) {
									for (var j = 0; j < that.kyCouponList.length; j++) {
										if (that.kyCouponList[j].couponReceiveId == disableCouponData[i]) {
											that.$set(that.kyCouponList[j], "disabledTag", true);
										}
									}
								}
							}
						}
					},
				});
			},
			
			
			//确认选择优惠券
			confirmSelectCouponHandler() {
				
				var that = this;
				
				var selectCouponData = [];
				for (var i = 0; i < that.kyCouponList.length; i++) {
					if (that.kyCouponList[i].selectedTag == 1) {
						selectCouponData.push(that.kyCouponList[i].couponReceiveId);
					}
				}
				
				
				that.showCouponModal = false;
				that.selectCouponData = [];
				for (var i = 0; i < that.kyCouponList.length; i++) {
					if (that.kyCouponList[i].selectedTag == 1) {
						that.selectCouponData.push(that.kyCouponList[i].couponReceiveId);
					}
				}
				
				// 计算订单费用
				that.calculateOrderFee();
			},


			//计算订单费用
			calculateOrderFee() {

				var that = this;
				that.$api.globalUtil.requestAjax({
					url: "/OrderApi/sellteOrderForApi",
					method: "POST",
					data: {
						shopCartIds: that.shopCartIds.join(","), //购物车id
						customerAddressId: that.addressData.id, //收货地址id
						couponReceiveId: (that.selectCouponData? that.selectCouponData.join(",") : ""), //优惠券id
						useGiftCard: that.useGiftCardFlag ? "1" : "0",
						activityGroupMainId: that.activityGroupMainId,//大团id
						activityGroupId: that.activityGroupId, //小团id
						bargainId: that.bargainId,//砍价id
						prizeReceiveId: that.prizeReceiveId //中奖id
					},
					success: function(res) {
						if (res.data.success) {
							that.orderFeeInfo = res.data.response;
						}
					}
				});
			},


			//提交订单
			submitOrderHandler() {
				
				var that = this;
				var weixinFalg = true;
						
				if(weixinFalg) {
					
					var shopIds = [];
					for (var i = 0; i < that.shopCartData.length; i++) {
						shopIds.push({
							verderId: that.shopCartData[i].shopId,
							remark: that.shopCartData[i].message
						});
					}
					
					if(!that.addressData || !that.addressData.id) {
						that.$api.msg('请选择收货地址');
						return ;
					}
					
					var reductionIds = [];
					for (var i = 0; i < that.orderFeeInfo.reductionList.length; i++) {
						reductionIds.push(that.orderFeeInfo.reductionList[i].reductionId);
					}
					
					
					//发票信息
					var customerInvoiceDetailList = [];
					for (var i = 0; i < that.shopCartData.length; i++) {
						if(that.shopCartData[i].invoiceInfo) {
							customerInvoiceDetailList.push({
								venderId: that.shopCartData[i].shopId,
								cidInvoiceId: that.shopCartData[i].invoiceInfo.cfId,
								cidType: that.shopCartData[i].invoiceInfo.cidType,
								cidText: that.shopCartData[i].invoiceInfo.cidText,
								cidEmail: that.shopCartData[i].invoiceInfo.ciEmail
							});
						}
					}
					
					that.$api.globalUtil.requestAjax({
						url: "/OrderApi/createOrderForApi",
						method: "POST",
						data: {
							shopCartIds: that.shopCartIds.join(","), //购物车id
							customerAddressId: that.addressData.id, //收货地址id
							orderVerders: shopIds,
							couponReceiveId: (that.selectCouponData? that.selectCouponData.join(",") : ""), //优惠券id
							dispatchingType: 0, //
							reductionIds: reductionIds.join(","),
							useGiftCard: that.useGiftCardFlag ? "1" : "0",
							activityGroupMainId: that.activityGroupMainId,//大团id
							activityGroupId: that.activityGroupId, //小团id
							bargainId: that.bargainId, //砍价id
							prizeReceiveId: that.prizeReceiveId, //中奖id
							customerInvoiceDetailList: customerInvoiceDetailList,
							shareGoods: this.shareGoods || ''
						},
						success: function(res) {
							if (res.data.success) {
								var orderData = res.data.response;
								that.orderData = orderData;
								
								//订单支付流程
								that.payProcessHandler(orderData);
							}
						}
					});
				}
			},
			
			
			//订单支付流程
			payProcessHandler(orderData) {
				
				var that = this;
				
				// 拼团订单
				if(orderData.advFlag == 1) {
					if(orderData.advAmount == 0) {
						
						//是否设置了支付密码
						that.getIfOrNotSetedPayPass();
					}else {
						uni.redirectTo({
							url: '/pagesOrder/pay?orderParentId='+orderData.orderParentId+'&orderPayAmount='+orderData.advAmount+'&orderIds='+orderData.orderIds
						});
					}
				}else {
					if(orderData.payAmount == 0) {
						
						//是否设置了支付密码
						that.getIfOrNotSetedPayPass();
					}else {
						uni.redirectTo({
							url: '/pagesOrder/pay?orderParentId='+orderData.orderParentId+'&orderPayAmount='+orderData.payAmount+'&orderIds='+orderData.orderIds
						});
					}
				}
			},
			
			
			//忘记密码
			gotoPayPassPage() {
				uni.navigateTo({
					url: '/pagesUser/payPass'
				});
			},
			
			
			//是否设置了支付密码
			getIfOrNotSetedPayPass() {
				
				var that = this;
				that.$api.globalUtil.requestAjax({
					url: "/CustomerApi/findCustomerByCustomerIdForApi",
					method: "POST",
					success: function(res) {
						if(res.data.success) {
							if(res.data.response.boundPayPwd) {
								that.showPayPassFlag = true;
							}else {
								that.$api.msg("请设置支付密码");
								setTimeout(function() {
									uni.navigateTo({
										url: '/pagesUser/payPass'
									})
								}, 2000);
							}
						}
					}
				});
			},
			
			
			//支付密码数字弹窗
			closePayModalHandler() {
				this.showPayPassFlag = false;
				this.$api.msg("取消支付");
				
				uni.setStorageSync('orderStatus', "02");
				setTimeout(function() {
					uni.switchTab({
						url: '/pages/order/order'
					});
				}, 1500);
			},
			showFun(){
				this.show_key = true;
			},
			hideFun(){
				this.show_key = false;
			},
			getPassword(n){
				this.password = n;
			},
			
			
			// 确认支付
			confirmPayHandler() {
				
				//余额支付
				this.amountBalancePay();
			},
			
			
			// 账户余额支付
			amountBalancePay() {
				
				if(this.password.length < 6) {
					this.$api.msg("请输入6位支付密码");
					return ;
				}
				
				var that = this;
				that.$api.globalUtil.requestAjax({
					url: "/PayApi/payForApi",
					method: "POST",
					data: { 
						orderParentId: that.orderData.orderParentId,
						orderIds: that.orderData.orderIds,
						payPassword: that.password
					},
					success: function(res) {
						if(res.data.success) {
							that.$api.msg("支付成功");
							uni.navigateTo({
								url: '/pagesOrder/successCoupon?orderParentId='+that.orderData.orderParentId+'&orderIds='+that.orderData.orderIds
							});
						}
					}
				});
			},
			
			
			//实名认证
			realNameHandler() {
				
				let that = this;
				if(!that.realNameInput.userName) {
					that.$api.msg("请输入真实姓名");
				}else if(!that.realNameInput.idCard) {
					that.$api.msg("请输入身份证号");
				}else {
					
					uni.showLoading();
					that.$api.globalUtil.requestAjax({
						url: "/CustomerApi/checkCustomerIdCardForApi",
						method: "POST",
						data: {
							name: that.realNameInput.userName,
							idCard: that.realNameInput.idCard
						},
						errorMsg: "实名认证未通过",
						success: function(res) {
							if(res.data.success) {
								
								that.$api.msg("认证成功");
								setTimeout(function() {
									uni.hideLoading();
									that.realName.userName = that.realNameInput.userName;
									that.realName.idCard = that.realNameInput.idCard;
									that.realNameFlag = true;
									that.showRealNameFlag = false;
								}, 1500);
							}else {
								uni.hideLoading();
								that.realNameFlag = false;
								that.$api.msg(res.data.msg || "认证失败");
							}
						}
					});
				}
			},
			showRealNameHandler() {
				this.realNameInput.userName = this.realName.userName || "";
				this.realNameInput.idCard = this.realName.idCard || "";
				this.showRealNameFlag = true;
			},
			closeRealNameHandler() {
				this.showRealNameFlag = false;
			}
		}
	};
</script>

<style lang="scss">
	page {
		background: #f5f5f5;
		padding-bottom: 100rpx;
		padding-bottom: calc(100rpx + 60rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(100rpx + 60rpx + env(safe-area-inset-bottom));
	}
	
	
	/* header部分 */
	.header-Container {
		top: 0;
		width: 100%;
		height: 176rpx;
		overflow: hidden;
		box-shadow: 0px 1rpx 1rpx 0px rgba(0, 0, 0, 0.08);
		background: rgba(255, 255, 255, 1);
	
		.leftBtns {
			display: flex;
			align-items: center;
			justify-content: flex-start;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 86rpx;
	
			.back {
				margin-left: 17rpx;
				width: 44rpx;
				height: 44rpx;
			}
		}
	
		.title {
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 86rpx;
			line-height: 86rpx;
			text-align: center;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: rgba(51, 51, 51, 1);
		}
	}

	//收货地址
	.address {
		display: flex;
		align-items: center;
		position: relative;
		padding: 40rpx 30rpx 30rpx 30rpx;
		width: 100%;
		background-color: white;
		box-shadow:0px 3rpx 6rpx 0px rgba(0, 0, 0, 0.1);
		border-radius: 16rpx 16rpx 0 0;
		
		.icon {
			display: flex;
			align-items: flex-start;
			width: 22rpx;
			height: 100%;

			image {
				display: block;
				width: 22rpx;
				height: 26rpx;
			}
		}

		.message {
			display: flex;
			flex-direction: column;
			max-width: 620rpx;
			
			.row_1 {
				display: flex;
				align-items: center;
			}

			.userInfo {
				padding-left: 16rpx;
				
				.user {
					font-size: 25rpx;
					font-weight: bold;
					
					text:last-child {
						margin-left: 48rpx;
					}
				}
			}
			
			.detail {
				margin-left: 40rpx;
				margin-top: 20rpx;
				font-size: 24rpx;
				max-width: 620rpx;
				color: #666666;
			}
		}
		
		.addressMore {
			margin-left: auto;
			width: 15rpx;
			height: 27rpx;
		}
		
		.bottom-tiao {
			width: 100%;
			height: 5rpx;
			position: absolute;
			// z-index: 10;
			bottom: 0;
			left: 0;
		}
	}
	.noAddress-Container {
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		width:100%;
		height:100rpx;
		background:rgba(255,255,255,1);
		box-shadow:0px 3rpx 6rpx 0px rgba(0, 0, 0, 0.1);
		border-radius:0px 0px 16rpx 16rpx;
		
		.addIcon {
			width: 35rpx;
			height: 35rpx;
		}
		
		.addText {
			margin-left: 26rpx;
			line-height: 100rpx;
			font-size:26rpx;
			font-family:PingFang SC;
			// font-weight:bold;
			color:rgba(224,19,39,1);
		}
		
		.rightRed {
			margin-left: auto;
			width: 15rpx;
			height: 27rpx;
		}
	}
	
	
	// 身份认证信息
	.recognition {
		padding: 40rpx 30rpx 40rpx 30rpx;
		height: 150rpx;
		border-radius: 0px 0px 16rpx 16rpx;

		.r-user {
			margin-left: 16rpx;
			font-size: 25rpx;
			font-weight: bold;
			color: #e01327;
		}

		.r-detail {
			margin-top: 20rpx;
			font-size: 24rpx;
			width: 636rpx;
			color: #666666;
		}
		
		.detail {
			margin-top: 0 !important;
		}
	}

	
	//订单商品信息
	.goods-img {
		background-color: white;
		width: 100%;
		height: 230rpx;
		display: flex;
		align-items: center;
		border-radius: 16rpx;
		margin-top: 20rpx;

		.imgs {
			overflow: hidden;
			width: 574rpx;
			margin-left: 16rpx;
			display: flex;
			flex-wrap: nowrap;
			view {
				display: flex;
			}
			image {
				height: 170rpx;
				width: 170rpx;
				margin-left: 16rpx;
			}
		}

		.num-total {
			display: flex;
			font-size: 23rpx;
			color: #333333;
			margin-left: 42rpx;
			align-items: center;

			image {
				margin-left: 8rpx;
				width: 9rpx;
				height: 16rpx;
			}
		}
	}
	
	
	/* 单条商品 */
	.goods-box-single{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		position: relative;
		margin: 0 auto;
		margin-top: 20rpx;
		padding: 30rpx;
		width: 100%;
		background: #FFFFFF;
		border-radius:16rpx;
	
		&.borderOneRpx:after { 
			border-radius:10rpx;
			border-color: rgba(238,238,238,1);
		}
		
		.goodsBaseInfo {
			display: flex;
			align-items: center;
			width: 100%;
			
			.goods-img{
				display: block;
				margin-top: 0;
				width: 170upx;
				height: 170upx;
			}
			.right{
				flex: 1;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				padding: 16rpx 0 16rpx 24rpx;
				height: 170rpx;
				overflow: hidden;
				
				.title{
					font-size:24rpx;
					color:rgba(51,51,51,1);
					line-height:34rpx;
				}
				//规格/价格
				.specPrice {
					display: flex;
					align-content: center;
					justify-content: space-between;
					
					.attr-box{
						max-width: 350rpx;
						font-size:20rpx;
						color:rgba(153,153,153,1);
						line-height:22rpx;
					}
					.price{
						font-size:24rpx;
						color:rgba(51,51,51,1);
						line-height:22rpx;
					}
				}
				//购买数量
				.buyNum {
					height:18rpx;
					text-align: right;
					font-size:24rpx;
					color:rgba(102,102,102,1);
					line-height:22rpx;
				}
			}
		}
		
		//赠品信息
		.gift {
			display: flex;
			width: 100%;
			margin-top: 30rpx;
			padding-left: 194rpx;
		
			.left {
				font-size: 20rpx;
				font-weight:bold;
				color: #333333;
			}
			.g-name {
				margin-left: 10rpx;
				max-width: 380rpx;
				font-size: 20rpx;
				color: #666666;
			}
			.g-num {
				margin-left: auto;
				font-size: 20rpx;
				color: #333333;
			}
		}
	}


	// 优惠券等信息
	.discount {
		margin-top: 20rpx;
		padding: 30rpx;
		width: 100%;
		background: white;
		border-radius: 16rpx;
		
		.discount-block {
			display: flex;
			align-items: center;
			width: 100%;
			height: 35px;
			font-size: 22rpx;

			.left {
				width: 150rpx;
				color: #333333;
			}

			.right {
				width: 100%;
				display: flex;
				flex: 1;
				align-items: center;
				flex-direction: row-reverse;
				font-size: 26rpx;

				switch {
					zoom: 0.4;
					display: flex;
					align-items: center;
				}

				.icon {
					display: flex;
					position: relative;
					margin-right: 24rpx;

					image {
						height: 29rpx;
						width: 98rpx;
					}

					view {
						font-size: 17rpx;
						position: absolute;
						width: 100%;
						height: 100%;
						left: 0;
						top: 0;
						display: flex;
						justify-content: center;
						align-items: center;
						color: #FE5E49;
						white-space: nowrap;
					}
				}

				.price {
					color: #333333;
					font-size: 24rpx;
					margin-right: 15rpx;
				}

				.price-red {
					color: #FE5E49;
					
					font-size: 24rpx;
					font-weight: bold;
					margin-right: 15rpx;
				}

				.tap {
					width: 10rpx;
					height: 16rpx;
				}
			}
		}
	}

	.title2 {
		color: #666666 !important;
		font-size: 23rpx;
	}

	.bottom-total {
		position: fixed;
		left: 0;
		bottom: 0;
		background-color: white;
		width: 100%;
		height: 98rpx;
		display: flex;
		align-items: center;
		border-top: 1rpx solid #eee;

		.left {
			width: 450rpx;
			padding-left: 32rpx;
			font-size: 28rpx;
		}

		.right {
			width: 300rpx;
			display: flex;
			flex-direction: row-reverse;
			margin-right: 29rpx;

			view {
				font-size: 28rpx;
				width: 194.4rpx;
				height: 70rpx;
				/* background-image: linear-gradient(to right, #d21728, #d102a8); */
				background: #FE5E49;
				color: white;
				border-radius: 35rpx;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}

	//下拉底部地址
	.bottom-address {
		position: fixed;
		left: 0;
		width: 100%;
		height: 60rpx;
		line-height: 60rpx;
		color: #a05f20;
		background: #fff2ca;
		font-size: 24rpx;
		padding: 0 30rpx;
		bottom: 100rpx;
		bottom: calc(100rpx + constant(safe-area-inset-bottom));
		bottom: calc(100rpx + env(safe-area-inset-bottom));
	}
	
	
	
	/* 支付密码 */
	.payPassBg-Container {
		z-index: 99999;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		top: 0;
		width: 100vw;
		height: 100vh;
		background:rgba(0,0,0,0.7);
		
		
		/* 设置密码 */
		.setPass-Container {
			position: fixed;
			bottom: 520rpx;
			width: 600rpx;
			height: 478rpx;
			background-color: #FFFFFF;
			border-radius:16rpx;
			
			/* 弹窗标题 */
			.modalTitle {
				margin-top: 50rpx;
				margin-bottom: 75rpx;
				width: 100%;
				height:30rpx;
				line-height:30rpx;
				text-align: center;
				font-size:30rpx;
				font-family:PingFang SC;
				// font-weight:bold;
				color:rgba(51,51,51,1);
			}
			
			/* 关闭按钮 */
			.closeModalBtn {
				z-index: 99999;
				position: absolute;
				top: 36rpx;
				right: 36rpx;
				width: 25rpx;
				height: 24rpx;
			}
			
			.content {
				position: relative;
				display: flex;
				align-items: flex-start;
				justify-content: center;
				width: 100%;
				height: 90rpx;
				
				.passwordBg-Container {
					display: flex;
					justify-content: center;
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 90rpx;
					
					.password-bg {
						width: 535rpx;
						height: 90rpx;
					}
				}
				
				.password-item {
					position: relative;
					width: 90rpx;
					height: 90rpx;
					line-height: 90rpx;
					text-align: center;
					font-size:60rpx;
					font-family:PingFang;
					color:#333333;
					
					/* &.borderOneRpx:after {
						border-width: 4rpx;
						border-color: rgba(238,238,238,1);
						border-radius: 5rpx;
					} */
				}
			}
			
			/* 忘记密码 */
			.forgetPass-Container {
				display: flex;
				align-items: center;
				justify-content: center;
				position: absolute;
				bottom: 170rpx;
				width:100%;
				
				.forgetPass {
					width:544rpx;
					height:40rpx;
					line-height: 70rpx;
					text-align: right;
					font-size:20rpx;
					font-family:PingFang SC;
					color:rgba(224,19,39,1);
					line-height:40rpx;
				}
			}
			
			/* 确认支付 */
			.confirmPayOuter-Container {
				display: flex;
				align-items: center;
				justify-content: center;
				position: absolute;
				bottom: 70rpx;
				width:100%;
				height:70rpx;
				
				.confirmPay-Container {
					width:544rpx;
					height:70rpx;
					line-height: 70rpx;
					text-align: center;
					font-size:28rpx;
					font-family:PingFang SC;
					/* font-weight:500; */
					color:rgba(255,255,255,1);
					background:#FE5E49;
					border-radius:35rpx;
				}
			}
		}
	}
	
	
	// 身份认证信息
	.realName-OutContainer {
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 100;
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background:rgba(0,0,0,0.7);
		
		.realName-Container {
			position: relative;
			padding: 40rpx 60rpx 45rpx 60rpx;
			width:600rpx;
			height:562rpx;
			background:rgba(255,255,255,1);
			border-radius:16rpx;
			
			.closeModalBtn {
				position: absolute;
				right: 36rpx;
				top: 36rpx;
				width: 24rpx;
				height: 24rpx;
			}
			
			.dialogTitle {
				text-align: center;
				font-size: 30rpx;
				color: #333333;
			}
			
			.realName-tips_top {
				margin-top: 20rpx;
				width: 100%;
				line-height: 26rpx;
				text-align: center;
				font-size: 20rpx;
				color: #E01327;
			}
			.realName-tips_bottom {
				margin: 0 auto;
				margin-top: 20rpx;
				width: 440rpx;
				line-height: 26rpx;
				text-align: center;
				font-size: 20rpx;
				color: #999999;
			}
			
			
			//实名信息
			.realNameInfo {
				position: relative;
				margin: 0 auto;
				margin-top: 30rpx;
				width: 480rpx;
				height: 68rpx;
				line-height: 68rpx;
				background: rgba(238,238,238,1);
				border-radius: 5rpx;
				
				.label {
					padding-left: 22rpx;
					width: 100rpx;
					text-align-last: justify;
					text-align: justify;
					font-size: 24rpx;
					color: #333333;
				}
				
				input {
					position: absolute;
					left: 135rpx;
					top: 0;
					width: 330rpx;
					height: 68rpx;
					line-height: 68rpx;
					text-align: left;
					font-size: 24rpx;
					color: #333333;
				}
				.inputHolder {
					text-align: left;
					font-size: 24rpx;
					color: #BFBFBF;
				}
			}
			
			//保存按钮
			.realNameBtn {
				margin: 0 auto;
				margin-top: 46rpx;
				width: 480rpx;
				height: 70rpx;
				line-height: 70rpx;
				text-align: center;
				font-size: 28rpx;
				color: rgba(255,255,255,1);
				background: #FE5E49;
				border-radius: 35rpx;
			}
		}
	}
	
	
//小程序安全区域
.safeBottom {
	z-index: 9;
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 100rpx;
	height: calc(100rpx + constant(safe-area-inset-bottom));
	height: calc(100rpx + env(safe-area-inset-bottom));
	background-color: #FFFFFF;
}
.bottom-total {
	left: 0;
	bottom: 0;
	bottom: calc(constant(safe-area-inset-bottom));
	bottom: calc(env(safe-area-inset-bottom));
}
</style>




